/**
 * Created with IntelliJ IDEA.
 * User: ajhin
 * Date: 4/15/13
 * Time: 11:03 PM
 * To change this template use File | Settings | File Templates.
 */
package societyGames.xmlFragmentTest
{
import societyGames.xmlFragment.XMLFragment;
import societyGames.xmlFragment.XMLFragmentEditList;

public class Person extends XMLFragment
{
  [FragmentCollection(className="societyGames.xmlFragmentTest.Pet", nodeName="pet")]
  public var pets:XMLFragmentEditList;

  [Fragment(nodeName="spouse")]
  public var spouse:Person;

  override protected function getDefaultXML():XML
  {
    return <person name="Default">
      <pet>Default</pet>
    </person>;
  }

  public function get name():String
  {
    return _xml.@name;
  }

  [Bindable]
  public function set name(value:String):void
  {
    _xml.@name = value;
  }
}
}
